/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package infra.protocol;

import java.io.File;
import java.rmi.Remote;
import java.rmi.RemoteException;
import models.Project;
import models.TextChanges;
import models.User;

/**
 *
 * @author root
 */
public interface ConnectionProtocolRemote extends Remote {
    
    public boolean getConnection(User user) throws RemoteException;
    
    public void sendTextChange(int fileID,TextChanges txtChange) throws RemoteException;
    public TextChanges receiveTextChange() throws RemoteException;
    
    public String[] getProjectList() throws RemoteException;
    
    public boolean sendNewProject(Project proj) throws RemoteException;
    public Project getProject(String title) throws RemoteException;
    public boolean editProject(Project proj) throws RemoteException;
    public boolean deleteProject(String title) throws RemoteException;
    
    public String[] getFileList(String project) throws RemoteException;
    
    public boolean sendNewFile(File file) throws RemoteException;
    public File getFile(String id) throws RemoteException;
    public boolean editFile(File file) throws RemoteException;
    public boolean deleteFile(String id) throws RemoteException;
    
}
